home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
discs
/
utilities
/
utility_02
/
convrters2
/
!Draw->CGM
/
!Help
next >
Wrap
Text File
|
1996-02-05
|
15KB
|
448 lines
CAREWARE
~~~~~~~~
!Draw->Cgm Version 1.5 !help.
THIS PROGRAM IS CAREWARE IS IS NOT PUBLIC DOMAIN
~~~
The following have written permission to reproduce this software on
their respective Careware disks :-
Norwich Computer Services : Careware Disks
Alex Bar (Furth Germany ): German Careware Disks
ARM Club ( CD-ROM )
They will also be supplied with updates.
The Author will also upload it to Careware sections on Arcade and NCS bbs.
From which it maybe downloaded.
It may NOT be uploaded by anyone other than the Author.
It may NOT be reproduced by any other means ( other than above )
without written consent of the author.
Arcade and NCS do NOT have authority to authorise copying by any means other than
above.
Last updated
~~~~~~~~~~~~
Application : 15th April 1993
Documentation : 15th April 1993
!Draw->CGM is a Utility for converting Acorn Draw files to CGM Computer
Graphics Metafiles as may be imported into Lotus FreeLance and other
Graphics tools on the PC.
It has been tested with Freelance V2.01 and Freelance V3.00
Installation
~~~~~~~~~~~~
The DrawCgm_arc file should have been restored to a directory named
!Draw->CGM. Which should contain the following files :-
!Run : Draw->Cgm Startup file.
!Sprites : Draw->Cgm Application Sprites
!Templates : Template files
Draw-cgm : Draw->Cgm Application.
Palette : Default conversion palette.
Freelance : Freelance V2 palette
~~config : Configuration file for Draw->Cgm.
!Help : This file.
Tailoring
~~~~~~~~~
The !run file should be altered to suite your requirements :-
Modules required :-
The Shared C Library should be loaded as appropriate for
your setup. The supplied !run file assumes that the C
shared library module is in !system.modules.
Colourtrans is required to map colours to default.
Variables required :-
draw-cgm$dir is required in order for draw->cgm to find its various
configuration files.
Storage required :-
!Draw->CGM has been tested with a wimpslot size of 128k
on a machine with 32k pages. lower values may be possible
on machines with smaller page sizes.
The file to be converted is loaded into a buffer claimed from
the next slot. The space is return immediately after the conversion,
so you should not be able to see the change.
Storage is also claimed to flatten Beziers.
If !Draw->CGM prompts that it does not have enough memory to process,
then !Draw->CGM must be restarted, having made provision that
the next slot is large enough.
Operation
~~~~~~~~~
1) First click on the !Draw->CGM icon. This will install the !Draw->CGM
icon on the icon bar.
2) To convert a Draw file, drag the file to the !Draw->CGM icon on
the icon bar. This will popup a save Cgm window. Drag the Cgm
file icon to the required destination.
NOTE :
The conversion is not commutable i.e. a file convert to CGM then converted
back to draw will not be exactly the same, therefore it is advisable that
the source and destination be in different directories
Apparent Freelance V2.01 Restrictions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Freelance does not allow for filled objects within filled objects.
Freelance does not use standard Metafile descriptions of polygon
outline line types, but uses a user defined description unique
to itself.
Current Restrictions to be removed in a future release
TextAreas are currently not supported.
Line endings are currently ignored.
Translation Options
~~~~~~~~~~~~~~~~~~~
Whilst CGM is a standard definition not all programs recognise all CGM
elements. Options are available to influence !DrawCGM's creation of the
target CGM file. The options window is available via the icon menu.
Colour Translation
~~~~~~~~~~~~~~~~~~
Fixed Colours
-------------
Uses colours based on the palette entries in the Palette file
in the !DrawCGM directory. A copy is also supplied in the file
Freelance. If you decide to alter palette please leave Freelance
alone so that others may restore the Palette to that originally
supplied.
Palette Colours
---------------
Uses a colour table. The colour table being created from
the wimp palette at the time of conversion.
Direct colours
--------------
This uses the !DRAW RGB values to construct CGM RGB values.
This should give minimum loss of colour information.
But does not seem to be supported by many packages
that can import Metafiles.
Other Translations
~~~~~~~~~~~~~~~~~~
Polygon Set ( Filled Areas )
----------------------------
The draw format is quite a rich graphics description. In order to
support filled areas correctly the CGM element disjointed polygon
is required. Unfortunately most PC packages support only a CGM
subset. As a result Disjointed Polygon is often not supported or not
recognised.
The above problem most often occurs when text has been converted
into draw format i.e. by !FontFX, !FontEd !Drawtext etc.
In order to address this problem !Draw->CGM takes note Polygon set option.
The following are the recommended approaches to tackling
the problem.
1) If the target CGM environment supported Disjointed Polygon.
Then set the polygon set option.
2) If the target CGM environment does not supported Disjointed Polygon.
Then do not set the polygon set option. If !Draw->CGM then encounters
an internal move in the path, it will change the outline colour
to the background and then redraw the outline in the correct
colour as a non filled polygon. The above should look correct if
the target environment takes the background colour correctly into
account.
3) If 2) fails and produces filled areas with the odd fine white line.
Then a third method can be used, but this does involve some manual
effort. Proceed as follows :-
a) Make sure any problem areas are unfilled.
b) Translate the Draw file to CGM using !Draw->CGM.
c) Use !CGM->Draw to translate the CGM file back to draw.
This will make sure that any internal moves are changed
to separate paths.
d) With the new Draw file fill in the required areas.
This may well require that some lines are sent to the back
or others brought to the front. Other areas will have to be
filled white. For example if one takes a capital A as
a draw file and using the above. The central 'triangle'
will have to be at the front and filled white.
e) Finally convert the draw file to !Draw->CGM
Restricted Text
---------------
Selection of this option will causes text to be output using the CGM operation
Restricted Text, this should improve text translation where text has been
resized.
Perimeter / Edges
-----------------
Selection of this option will causes edge/perimeter values to be output instead
of just line values. Will be need for most translations except Freelance V2.
Sprite / Cell Array
-------------------
Selection of this option will causes sprites to be output as CGM cell arrays,
note however few if any PC packages support import of CGM files with cell arrays
Other Translation factors
~~~~~~~~~~~~~~~~~~~~~~~~~
Bezier Curves
-------------
These are translated to a polyline or polygon.
Ellipse Translation
-------------------
Draw holds ellipses as a series of bezier curves. these are
therefore translated as polyline or polygon.
!FontEd Characters
------------------
!FontEd allows individual characters to be transferred to another
application as draw files. Therefore a character dragged from
!FontEd into draw will be translated by Draw->CGM accordingly.
Restrictions
------------
Sprites are only supported in the translation to CGM if the
target CGM supports the Cell Array. Most PC package seem to
ignore or complain at the CGM Cell array element.
Config File.
~~~~~~~~~~~~~~
The ~~config file controls font translation.
The first entry is the number of CGM font entries ( Integer )
Followed by the CGM names each terminated by a comma ( To allow for names with spaces ).
The next entry is the number of Draw font entries.
The appropriate number of font entries then follow.
A Draw font entry consist's of following separated by spaces.
A Acorn Font name. ( String )
The required Freelance font number ( Integer )
height adjustment multiplier ( Integer )
height adjustment divisor ( Integer )
Font Number
The corresponding CGM font numbers ( Some packages require font
numbers to start at 0 others 1
Height adjustment
The height read from the draw file is adjusted as follows
( height * multiplier ) / divisor.
Tailoring CGM font names
To make the most of font translation you will need to modify the CGM
font names for your target environment. The best way to do this is to
create a diagram containing the required fonts in the target environment.
Then export this to CGM. Use !CGM->Draw on the CGM file with the trace
option turned on. Examine the trace file for the appropriate font names.
Hints on creating foils
~~~~~~~~~~~~~~~~~~~~~~~
Rotated & Fancy Characters.
Characters from Outline fonts may dragged from !FontEd to
!Draw. Once in !Draw they may be enlarged, rotated. They
will be translated to a filled polygon in
CGM File type
~~~~~~~~~~~~~
The CGM file type is 405 which is a Norwich Computer Services allocated
file number. NCS are allocating some user file numbers in an attempt to
reduce the chances of a file number clash. The number will only change
again if Acorn allocate an official file number to ANSI Graphic Metafiles.
Importing into Freelance
~~~~~~~~~~~~~~~~~~~~~~~~
Transfer the file to the PC. The easiest way to do this is with
!PCDir. !PCDir allows for a draw file to be drag directly to the
!Draw->CGM icon and then straight to a PC diskette.
Make sure the file has an extension appropriate for
importing into Freelance, the default file extension is CGM.
Select : File.
Import
Then file to be imported.
The file extension and path to be used for loading maybe changed
with Option selection.
Note : From !PCDir version 0.8 onwards, it is possible to have a
configuration file that translates file type 405 to CGM.
What if the CGM will NOT load into required PC Package
------------------------------------------------------
1) The point of having several options that control the creation of CGM files
is to be able to cope with variations in requirements of the target environments.
Ideally any importer of CGM files should be able to read any valid CGM file, unfortunately
this far from true for most PC packages, therefore you may need to experiment with
different options.
Tip: If the package concerned can export a CGM file, then you may find !Draw->CGM's
companion application !CGM->Draw useful as it has a quite detailed trace, which may
give some clues as to what the imported expects. Note this assumes that the package
will import what it exports ( Known NOT to be true for all PC packages !!! )
2) Some of the better packages have a trace facility or provide good diagnostics, if you
are using such a facility please send the details when reporting problems ( Thanks ).
3) If you have access to other packages try importing into these and then re-exporting
to CGM. If the re-exported file succeeds, please send both successful and failing
files when reporting the problem (Thanks)
4) Finally !Draw->CGM 1.1 is know to work for Freelance Plus Version 2 & 3 / PageMaker
Interleaf and reported to work with CorelDraw, so why not write to the package and
ask why their package cannot.
Copyright & Contributions
~~~~~~~~~~~~~~~~~~~~~~~~~
This software carries no warranty, either express or implied.
I can not guarantee that it is free of bugs or give any warranty
about itæs suitability for use.
The status of !Draw->CGM is Careware.
Permission is granted to Norwich Computer Services to reproduce !CGM->Draw on Careware disks.
The software will be uploaded to Careware sections on Arcade and Archive Bulletin Boards,
it may only be uploaded by the author. It may not be uploaded by anybody else or
to any other board.
This software may NOT be distributed by public domain libraries.
If you did not obtain the software from a Careware disk or by subscription to one of the
Bulletin Board Careware sections. ( i.e. You obtained it from a friend who does, say. )
Then please send a contribution to either
Heatherley Cheshire Home
Effingham Lane,
Copthorne,
Sussex.
RH10 3HS.
Registered Charity Number : 218186
or
Chipstead Lake Cheshire Home
Chevening Road
Chipstead
Sevenoaks
Kent
TN13 2SD.
The software may not otherwise be copied or distributed without the Authors written permission.
Copyright remains solely the authors. (C) Keith Sloan
I may be contacted by electronic mail at the following :-
User: Keith Sloan on ArcadeBBS : London 081 654 2212
Fidonet : Keith Sloan @ 2:254/7.0
Internet : keiths@cix.compulink.co.uk
Version History
~~~~~~~~~~~~~~~
Various BetaTest Version
1.1 March 1992 : First Non BetaTest
1.2 May 1992 : Support for Restricted Text
1.3 June 1992 : Restricted Text an option.
Font list supported.
1.4 Jan 1993 : Text at an angle
Do not barf as Risc OS 3.10 draw orders.
1.5 April 1993 : Recognise Risc OS 3.10 Draw paper options
Improvement areas
~~~~~~~~~~~~~~~~~
Filled areas with more than one move could be improved a lot.
FootNote
~~~~~~~~
This application has a companion application !CGM->Draw, to convert from
CGM format to draw.
Also an application to converting dxf to/from cgm
See Author for more details.